package com.zgc;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

@Slf4j
@SpringBootApplication
@ServletComponentScan
@EnableTransactionManagement //开启对事物管理的支持
//@EnableScheduling
public class ReggieTakeOut3Application {

    public static void main(String[] args) {
        SpringApplication.run(ReggieTakeOut3Application.class, args);
        log.info("项目启动成功...");
    }
    //启动类上加载
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}